//
//  RMMTaoCanDetialsTableViewCell.m
//  Romomo
//
//  Created by puman on 2016/12/28.
//  Copyright © 2016年 mazegong. All rights reserved.
//

#import "RMMTaoCanDetialsTableViewCell.h"

@implementation RMMTaoCanDetialsTableViewCell
{
    UIImageView *_imageV;
    UILabel *_nameLabel;
    UILabel *_countLabel;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _imageV = [[UIImageView alloc] initWithFrame:CGRectMake(15, 15, 60, 60)];
        _imageV.layer.masksToBounds = YES;
        _imageV.layer.cornerRadius = 5;
        [self.contentView addSubview:_imageV];
        
        _nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(_imageV.right + kRow, _imageV.top, kScreenWideth - _imageV.right - 25 , 20)];
        _nameLabel.textColor = COLORFROMCODE(0x303137 , 1);
        _nameLabel.font = kFont(15);
        [self.contentView addSubview:_nameLabel];
        
        _countLabel = [[UILabel alloc] initWithFrame:CGRectMake(_imageV.right + kRow, _nameLabel.bottom, kScreenWideth - _imageV.right - 25 , 20)];
        _countLabel.textColor = COLORFROMCODE(0xBFBFBF , 1);
        _countLabel.font = kFont(15);
        [self.contentView addSubview:_countLabel];
        
    }
    return self;
}
- (void)setDic:(NSDictionary *)dic{
    [_imageV sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kBaseImageUrl,[RMMFileManager retrunObjWith:dic[@"IMAGEURL"]]]] placeholderImage:[UIImage imageNamed:@"加载中@3x"]];
    _nameLabel.text = [RMMFileManager retrunObjWith:dic[@"SERVICE_NAME"]];
    _countLabel.text = [NSString stringWithFormat:@"x%@",dic[@"SERVICE_QTY"]];
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
